CREATE TABLE [dbo].[TTSEMA_FLUJ]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_ANIO] [dbo].[TD_IN_004_ANOS] NOT NULL,
[NU_SEMA] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTSEMA_FL__NU_SE__0658CF02] DEFAULT ((0)),
[FE_INIC_SEMA] [dbo].[TD_DT_001] NOT NULL,
[FE_FINA_SEMA] [dbo].[TD_DT_001] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTSEMA_FL__CO_US__074CF33B] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTSEMA_FL__FE_US__08411774] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTSEMA_FL__CO_US__09353BAD] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTSEMA_FL__FE_US__0A295FE6] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTSEMA_FLUJ] WITH NOCHECK ADD CONSTRAINT [CK__TTSEMA_FL__NU_AN__0564AAC9] CHECK NOT FOR REPLICATION (([NU_ANIO]>(1980)))
GO
ALTER TABLE [dbo].[TTSEMA_FLUJ] ADD CONSTRAINT [PK__TTSEMA_F__F09F59EE01D41107] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_ANIO], [NU_SEMA]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTSEMA_FLUJ] ADD CONSTRAINT [FK__TTSEMA_FL__CO_EM__6D2DF9DC] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
